x86/livepatch: Fail the build if duplicate symbols exist
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Thu, 4 Feb 2016 16:40:56 +0000 (16:40 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 30 Oct 2019 13:07:25 +0000 (13:07 +0000)
commitece1d5cda17c2815dd194909569deb254ddae575
tree8a9bd2f34ac5100c2bbb8e6d5fef0eae472e1bdf
parentb362c51679c9ffaf7258d4bc2cbb869749af85ee
x86/livepatch: Fail the build if duplicate symbols exist

The binary diffing algorithm used by xen-livepatch depends on having unique
symbols.

The livepatch loading algorithm used by Xen resolves relocations by symbol
name, and thus also depends on having unique symbols.

Introduce CONFIG_ENFORCE_UNIQUE_SYMBOLS to control failing the build if
duplicate symbols are found, and disable it in the RANDCONFIG build.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/x86/Makefile
xen/common/Kconfig
xen/tools/kconfig/allrandom.config
xen/tools/symbols.c